<html>
<body>
<div id="description"></div>
<div id="console"></div>
<script src="../../resources/js-test.js"></script>
<script>
description('This test checks if setting non-supported type does not throw an exception');

var xhr = new XMLHttpRequest();
xhr.open('GET', 'resources/plist.app', true);

// Setting valid type does change the responseType value.
["", "arraybuffer", "blob", "document", "json", "text"].forEach(function(type) {
    xhr.responseType = type;
    shouldBeEqualToString('xhr.responseType', type);
});

// Setting invalid type should not throw an exception.
shouldNotThrow('xhr.responseType = "dkjdfkjdfkj"');

// Setting invalid type doesn not change the responseType value.
shouldBeEqualToString('xhr.responseType = "text"; xhr.responseType = "asdfasdfasd"; xhr.responseType', 'text');

</script>
</body>
